//
//  MyGroundButton.swift
//  HiBook
//
//  Created by Apple on 16/7/28.
//  Copyright © 2016年 Apple. All rights reserved.
//

import UIKit
@IBDesignable
class MyGroundButton: UIButton {
    
    /*
     // Only override drawRect: if you perform custom drawing.
     // An empty implementation adversely affects performance during animation.
     override func drawRect(rect: CGRect) {
     // Drawing code
     }
     */
    @IBInspectable var buttonRadius:CGFloat = 0 {
        didSet{
            layer.cornerRadius = buttonRadius
            layer.masksToBounds = buttonRadius>0
        }
    }
    @IBInspectable var buttonBorderColor:UIColor? {
        didSet{
            layer.borderColor = buttonBorderColor?.CGColor
            layer.masksToBounds = true
            
        }
    }
    @IBInspectable var buttonBorderWidth:CGFloat=0 {
        didSet{
            layer.borderWidth = buttonBorderWidth
            layer.masksToBounds = buttonBorderWidth>0
            
        }
    }
    
}